package com.hzf.order.dao.model;

import com.hzf.material.dao.model.MaterialGoods;
import com.hzf.material.dao.model.MaterialGoodsModel;
import com.hzf.material.dao.model.MaterialShop;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

public class OrderCart implements Serializable {
    /**
     * 编号
     *
     * @mbg.generated
     */
    private Integer cartId;

    private Integer shopId;

    /**
     * 用户Id
     *
     * @mbg.generated
     */
    private Integer userId;

    /**
     * 商品ID
     *
     * @mbg.generated
     */
    private Integer goodsId;

    /**
     * 型号ID
     *
     * @mbg.generated
     */
    private Integer modelId;

    /**
     * 商品数量
     *
     * @mbg.generated
     */
    private Integer count;


    private Integer installId;

    private MaterialShop shops;

    private List<OrderCart> goods;

    private MaterialGoods materialGoods;

    private MaterialGoodsModel model;
    private String shopName;


    private static final long serialVersionUID = 1L;

    public Integer getCartId() {
        return cartId;
    }

    public void setCartId(Integer cartId) {
        this.cartId = cartId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getModelId() {
        return modelId;
    }

    public void setModelId(Integer modelId) {
        this.modelId = modelId;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public MaterialGoods getMaterialGoods() {
        return materialGoods;
    }

    public void setMaterialGoods(MaterialGoods materialGoods) {
        this.materialGoods = materialGoods;
    }

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public MaterialShop getShops() {
        return shops;
    }

    public void setShops(MaterialShop shops) {
        this.shops = shops;
    }

    public List<OrderCart> getGoods() {
        return goods;
    }

    public void setGoods(List<OrderCart> goods) {
        this.goods = goods;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public MaterialGoodsModel getModel() {
        return model;
    }

    public void setModel(MaterialGoodsModel model) {
        this.model = model;
    }

    public Integer getInstallId() {
        return installId;
    }

    public void setInstallId(Integer installId) {
        this.installId = installId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cartId=").append(cartId);
        sb.append(", userId=").append(userId);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", modelId=").append(modelId);
        sb.append(", count=").append(count);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderCart other = (OrderCart) that;
        return (this.getCartId() == null ? other.getCartId() == null : this.getCartId().equals(other.getCartId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
            && (this.getModelId() == null ? other.getModelId() == null : this.getModelId().equals(other.getModelId()))
            && (this.getCount() == null ? other.getCount() == null : this.getCount().equals(other.getCount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCartId() == null) ? 0 : getCartId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getModelId() == null) ? 0 : getModelId().hashCode());
        result = prime * result + ((getCount() == null) ? 0 : getCount().hashCode());
        return result;
    }
}